package vn.fpt.fsoft.entities;

import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;

import javax.persistence.ManyToOne;
import javax.persistence.Table;


// Generated May 5, 2014 11:06:28 AM by Hibernate Tools 3.4.0.CR1



/**
 * Author:	DuongPV1
 * Entity SupportingMaterial mapping with table SupportingMaterial in database
 * 
 * */
@Entity
@Table(name="SupportingMaterial")
public class SupportingMaterial implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 8395167798392521307L;
	@Id
	@GeneratedValue
	@Column(name="SupportingMaterialId")
	private int supportingMaterialId;
	@ManyToOne
	@JoinColumn(name="OrgId")
	private Organisation organisation;
	@Column(name="Url",nullable=true,length=255)
	private String url;
	@Column(name="Description",nullable=true,length=255)
	private String description;
	@Column(name="Type",nullable=true,length=20)
	private String type;
	@Column(name="AddDate",nullable=true,length=255)
	private String addDate;
	@Column(name="Status",nullable=true)
	private Boolean status;
	@ManyToOne
	@JoinColumn(name="UserId")
	private User user;
	public SupportingMaterial() {
	}

	public SupportingMaterial(int supportingMaterialId) {
		this.supportingMaterialId = supportingMaterialId;
	}

	public SupportingMaterial(int supportingMaterialId,
			Organisation organisation,User user, String url,
			String description, String type, String addDate,
			Boolean status) {
		this.supportingMaterialId = supportingMaterialId;
		this.organisation = organisation;
		this.url = url;
		this.description = description;
		this.type = type;
		this.addDate = addDate;
		this.status = status;
		this.user = user;
	}
	
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	public int getSupportingMaterialId() {
		return this.supportingMaterialId;
	}

	public void setSupportingMaterialId(int supportingMaterialId) {
		this.supportingMaterialId = supportingMaterialId;
	}

	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="OrgId",nullable=true)
	public Organisation getOrganisation() {
		return this.organisation;
	}

	public void setOrganisation(Organisation organisation) {
		this.organisation = organisation;
	}

	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="UserId",nullable=true)
	@Column(name="Url",nullable=true,length=255)
	public String getUrl() {
		return this.url;
	}

	public void setUrl(String url) {
		this.url = url;
	}
	
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}
	
	public String getType() {
		return this.type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	public String getAddDate() {
		return this.addDate;
	}

	public void setAddDate(String addDate) {
		this.addDate = addDate;
	}
	
	public Boolean getStatus() {
		return this.status;
	}

	public void setStatus(Boolean status) {
		this.status = status;
	}

}
